package Entities;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.CollectionOfElements;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
@Entity
@Table(name = "Local")

public class Entity_Local implements Serializable{
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue
	@Column(name = "id_local")
	private int idLocal;
	@Column
	private String ubicacion;
	
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_salon")
	private Entity_Salon salon;
	

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
	@JoinColumn(name = "id_local")
	private List<Entity_Empleado> empleados;
	
	@OneToMany(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_local")
	private List<Entity_Area> areas;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_caja")
	private Entity_Caja caja;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_carta")
	private Entity_Carta carta;
	@Column
	private float horasProduccion;
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "id_informe_reposicion")
	private Entity_InformeReposicion informes;
	

	
	//GET & SET
	public String getUbicacion() {
		return ubicacion;
	}

	public void setUbicacion(String ubicacion) {
		this.ubicacion = ubicacion;
	}

	public Entity_Salon getSalon() {
		return salon;
	}

	public void setSalon(Entity_Salon salon) {
		this.salon = salon;
	}

	public List<Entity_Empleado> getEmpleados() {
		return empleados;
	}

	public void setEmpleados(List<Entity_Empleado> empleados) {
		this.empleados = empleados;
	}

	public List<Entity_Area> getAreas() {
		return areas;
	}

	public void setAreas(List<Entity_Area> areas) {
		this.areas = areas;
	}

	public Entity_Caja getCaja() {
		return caja;
	}

	public void setCaja(Entity_Caja caja) {
		this.caja = caja;
	}

	public Entity_Carta getCarta() {
		return carta;
	}

	public void setCarta(Entity_Carta carta) {
		this.carta = carta;
	}

	public float getHorasProduccion() {
		return horasProduccion;
	}

	public void setHorasProduccion(float horasProduccion) {
		this.horasProduccion = horasProduccion;
	}

	public int getIdLocal() {
		return idLocal;
	}

	public void setIdLocal(int idLocal) {
		this.idLocal = idLocal;
	}

	public Entity_InformeReposicion getInformes() {
		return informes;
	}

	public void setInformes(Entity_InformeReposicion informes) {
		this.informes = informes;
	}

	

	

}
